<?php
namespace Zhub\HttpMessage;

use Zhub\DataStruct\Struct;

abstract class Message extends Struct
{
	const PROTOCOL_VERSION = 'protocolVersion';

	const BODY = 'body';

	const HEADER = 'header';


	public function getProtocolVersion():string
	{
		return $this->get(self::PROTOCOL_VERSION);
	}

	public function setProtocolVersion(string $protocolVersion)
	{
		$this->set(self::PROTOCOL_VERSION, $protocolVersion);
	}

	public function getBody():string
	{
		return $this->get(self::BODY);
	}

	public function setBody(string $body)
	{
		$this->set(self::BODY, $body);
	}

	abstract public function getHeader();

	abstract public function setHeader();

	public static function initialize():array
	{
		return [
			self::PROTOCOL_VERSION => '1.1',
			self::BODY => '',
		];
	}

}
